<!-- 订单详情 -->
<template>
	<view class="v-order-detail">

		<view class="orderStautsBg">

			<view class="orderStauts flex-between">
				<view class="flex-columns">
					<view class="  " style="font-size: 37rpx;">
						{{orderStatusFn(detailInfo.is_status)}}

					</view>
					<view class="flex-start margin-top_30rpx ">
						<button class="btncss" @click="kfFn()">
							<view class="flex v-icon">
								<image src="/static/pathKf.png"></image>
								<view style="height: 34rpx;margin: 0  16rpx 0 10rpx;">联系客服</view>
							</view>
						</button>
						<!-- <image class="kfImg " style="margin-right: 10rpx;" src="/static/pathKf.png" mode=""></image> -->
						<text> | 点击旁边客服按钮安装软件</text>
					</view>
				</view>
				<view class="">
					<image class="checkImg" src="/static/组合2986.png" mode=""></image>
				</view>

			</view>

		</view>

		<!-- <commodity isgroup="true" :content="detailList"></commodity> -->
		<!--  v-for="(i, j) in detailList" :key="j" -->
		<view class="background-color_FFFFFF margin_0_20rpx"
			style="margin-top: -40rpx;position: relative;border-radius: 20rpx;">
			<view class="v-shop-cart flex-columns">
				<view class="flex-align-center">
					<!-- <image class="border10" :src="detailList.foods_img"></image> -->
					<image class="border10" :src="detailInfo.pic_url">
					</image>
					<view class="flex-columns v-content flex1" style="height: 148rpx;">
						<view class="flex-between">
							<!-- <view class="v-name">{{ detailList.foods_name }}</view> -->
							<view class="v-name">{{detailInfo.goods_name}}</view>
						</view>
						<!-- 需修改样式‘上下底部对齐’ -->
						<!-- <text v-if="detailList.service_desc">周期服务：{{ detailList.service_desc }}</text> -->
						<view>规格：{{detailInfo.spec_name?detailInfo.spec_name:'无'}}</view>
						<view class="v-price">￥{{detailInfo.price}}</view>
						<!-- <view class="v-price">￥{{ detailInfo.goods.discount }}</view> -->
					</view>
				</view>
			</view>
			<view class="v-padding">
				<view class="flex-between">
					<view>商品总价</view>
					<text>￥{{detailInfo.price}}</text>
					<!-- <text>￥{{ detailList.service_price }}</text> -->
				</view>
				<view class="flex-between v-color-top">
					<view>商品价格</view>
					<text>￥{{detailInfo.total}}</text>
					<!-- <text>￥{{ detailList.service_price }}</text> -->
				</view>
				<view class="flex-between v-color-top" v-if="type==2">
					<view>团购价</view>
					<text>￥{{detailInfo.total}}</text>

				</view>
				<view class="flex-between v-color-top" v-if="type==3">
					<view>秒杀价</view>
					<text>￥{{detailInfo.total}}</text>

				</view>
				<view class="flex-between v-color-top" v-if="type==2">
					<text>报名费</text>
					<text style="color: #ff301d;">-￥{{detailInfo.entry_fee?detailInfo.entry_fee:'0.00'}}</text>

				</view>
				<view class="flex-between v-color">
					<text>抵用金</text>
					<text>-￥{{detailInfo.use_integral?detailInfo.use_integral:'0.00'}}</text>
					<!-- <text>￥{{ detailInfo.entry_price }}</text> -->
				</view>
				<view class="flex-between ">
					<text>实付款</text>
					<text>￥{{detailInfo.money}}</text>
					<!-- <text>￥{{ detailInfo.entry_price }}</text> -->
				</view>


			</view>
		</view>


		<view class="v-height2"></view>
		<!-- 订单信息 -->
		<view class="margin_0_20rpx background-color_FFFFFF " style="border-radius: 22rpx">
			<view class="v-title">订单信息</view>
			<block v-for="(i, j) in orderList" :key="j">
				<view class="v-detailo-message flex-align-center" :class="i.type != 2 ? 'border-bottom' : ''">
					<text>{{ i.name }}</text>
					<view :class="i.isBlue == true ? 'blue' : 'color3'">{{ i.content }}</view>
					<view class="v-copy flex" v-if="i.type == 1" @click="paste()">复制</view>
				</view>
			</block>
		</view>
		<view style="height: 120rpx;"></view>
		<image src="/static/index.png" class="v-index-icon" @click="indexs()"></image>
		<view class="fixed" style="height: 120rpx;z-index: 976;">
			<view class="bottom-border2" v-if="isShow != true"></view>

			<view class="flex-end padding_20rpx_0" v-if="type==2">
				<view class="invoice flex margin-right_16rpx" v-if="(detailInfo.is_status==4)"
					@click="goEvaluateList(detailInfo.groupon_id)">查看评价</view>
				<view class="invoice flex margin-right_16rpx"
					v-if="detailInfo.need_invoice&&(detailInfo.is_status==3||detailInfo.is_status==4)"
					@click="issueInvoice(detailInfo.id)">开发票</view>
				<view class="payCommite flex margin-right_16rpx" v-if="detailInfo.is_status==5||detailInfo.is_status==3"
					@click.stop="comment(detailInfo.id)">
					立即评论
				</view>

			</view>


			<view class="flex-end padding_20rpx_0" v-if="type==5">
				<view class="invoice flex margin-right_16rpx" v-if="(detailInfo.is_status==4)"
					@click="goEvaluateList(detailInfo.presell_id)">查看评价</view>
				<view class="invoice flex margin-right_16rpx"
					v-if="detailInfo.need_invoice&&(detailInfo.is_status==3||detailInfo.is_status==4)"
					@click="issueInvoice(detailInfo.id)">开发票</view>
				<view class="payCommite flex margin-right_16rpx" v-if="detailInfo.is_status==5||detailInfo.is_status==3"
					@click.stop="comment(detailInfo.id)">
					立即评论
				</view>

			</view>

			<view class="flex-end padding_20rpx_0" v-else>
				<view class="invoice flex margin-right_16rpx" v-if="(detailInfo.is_status==4)"
					@click="goEvaluateList(detailInfo.goods_id)">查看评价</view>
				<view class="invoice flex margin-right_16rpx"
					v-if="detailInfo.need_invoice&&(detailInfo.is_status==2||detailInfo.is_status==4)"
					@click="issueInvoice(detailInfo.id)">开发票</view>
				<view class="payCommite flex margin-right_16rpx" v-if="detailInfo.is_status==5||detailInfo.is_status==2"
					@click.stop="comment(detailInfo.id)">
					立即评论
				</view>

			</view>

		</view>

		<sunui-popup ref="pop">
			<template v-slot:content>
				<view class="v-pop flex-column">
					<view class="v-pop-phone flex" @click="call()">
						<image src="/static/my/phone.png"></image>
						{{ kfPhone }}
					</view>
					<view class="v-cancel flex" @click="cancel()">取消</view>
				</view>
			</template>
		</sunui-popup>


		<!-- 使用优惠券 -->
		<sunui-popup ref="popcoupon">
			<template v-slot:content>
				<view class="v-pop-coupon">
					<view class="v-coupon-tilte flex">优惠明细</view>
					<mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback"
						@up="upCallback">
						<scroll-view scroll-y :style="list && Number(list.length) > 0 ? 'height:524rpx;' : ''">
							<block v-for="(item, index) in list" :key="index">
								<view class="flex-between v-coupons">
									<view class="flex-align-center v-left">
										<view class="flex-column">
											<view class="v-coupon-price">￥{{ item.less_money }}</view>
											<view class="v-identification" v-if="item.coupon_type == 2">无门槛</view>
										</view>
										<view class="flex-columns v-conditions-met flex1">
											<view class="v-bold">
												{{ item.coupon_type == 1 ? '满' + item.meet_money + '可用' : item.name }}
											</view>
											<text>有效期至 {{ item.expiration_time }}</text>
										</view>
									</view>
									<!-- <view class="v-coupon-btn flex" @click="receive(item)">使用</view> -->
									<radio-group name="apply">
										<label class="flex-align-center">
											<radio :value="item.value" color="#494949" :checked="item.checkCoupon"
												style="padding:12rpx;" @click="checkeBox(item.id, item)" />
										</label>
									</radio-group>
								</view>
							</block>
						</scroll-view>
					</mescroll-body>
					<!-- <view class="width100 flex"><view class="v-coupon-close flex" @click="couponClose()">关闭</view></view> -->
				</view>
			</template>
		</sunui-popup>

	</view>
</template>

<script>
	import antiThrottling from '@/utils/antiThrottling.js';
	export default {
		data() {
			return {
				kfPhone: uni.getStorageSync('kfSet').kf_phone,
				kfType: uni.getStorageSync('kfSet').kf_type,
				order_id: '',
				integralName: uni.getStorageSync('system').integral_name ? uni.getStorageSync('system').integral_name :
					'消费金',
				integralChecked: false,
				// 积分兑换比例 多少积分兑换一元
				ratio: uni.getStorageSync('system').integral_ratio,
				integral: uni.getStorageSync('user').integral,
				integralMoney: 0,
				// integralMoney（积分使用金额）的备份
				integralBack: 0,

				// 状态
				statusAll: '',

				user: uni.getStorageSync('user'),
				time: '',
				orderList: [{
						name: '订单号',
						content: 555555555,
						type: 1
					},
					{
						name: '下单时间',
						content: 55555555
					},
					{
						name: '支付方式',
						content: '微信支付'
					},
					{
						name: '订单状态',
						content: '已评论',
						isBlue: true
					},
					{
						name: '付款时间',
						content: 5555,
						type: 2
					}
				],
				// 优惠券列表
				list: [],
				id: '',
				detailInfo: {},
				detailList: {},
				mobile: uni.getStorageSync('mobile'),
				// 1:微信支付(默认) 2:余额支付
				applyId: 1,
				zfList: [{
						text: '微信支付',
						img: '/static/wx2.png',
						icon: '/static/selece1.png',
						checked: true,
						id: 1
					},
					{
						text: '余额支付',
						img: '/static/money.png',
						icon: '/static/selece3.png',
						checked: false,
						id: 2
					}
				],
				real: 0,

				cc: 0,
				// 实际付款
				realSum: 0,
				// 优惠id
				couponId: '',
				// 优惠金额
				couponMoney: '',
				// 优惠语
				couponHint: '',
				priceSum: 0,


				// 填写服务
				service: '',
				// 填写真实姓名（非必传）
				contacts: '',
				// =1 是从我的账单进入，隐藏按钮
				isBill: 0,
				type: ''
			};
		},
		onLoad(options) {


			this.order_id = options.orderId
			this.type = options.type

			this.orderDetailFn()
		},
		onShow() {
			antiThrottling.releaseKey('submit');
		},
		computed: {
			// 订单状态
			orderStatusFn: function() {
				return function(status) {

					let orderStatus = '';
					if (this.type == 2) {
						orderStatus =
							status == 0 ? '已取消' : status == 1 ? '待付款' : status == 2 ? '拼团中' : status == 3 ? '已完成' :
							status == 4 ? '已评价' : '已开票';
					} else if (this.type == 4) {
						// status订单状态（0.待付款 1.待接单 2.已接单 3.服务中 4.已完成 5.已取消/退款)
						orderStatus =
							status == 0 ? '已取消' : status == 1 ? '待付款' : status == 2 ? '砍价中' : status == 3 ? '已完成' :
							status == 4 ? '已评价' : '已开票';

					} else if (this.type == 5) {
						// status订单状态（0.待付款 1.待接单 2.已接单 3.服务中 4.已完成 5.已取消/退款)
						orderStatus =
							status == 0 ? '已取消' : status == 1 ? '待付款' : status == 2 ? '众筹中' : status == 3 ? '已完成' :
							status == 4 ? '已评价' : '已开票';

					} else {
						// status订单状态（0.待付款 1.待接单 2.已接单 3.服务中 4.已完成 5.已取消/退款)
						orderStatus =
							status == 0 ? '已取消' : status == 1 ? '待付款' : status == 2 ? '已完成' : status == 4 ? '已评价' :
							'已开票';

					}


					return orderStatus;
				};
			},
		},
		methods: {
			kfFn() {

				if (uni.getStorageSync('kfSet').kf_type == 1) {
					// 弹电话
					this.$refs.pop.show({
						anim: 'bottom',
						position: 'bottom',
						shadeClose: true, //false使用户不能点击其它关闭页面
						topclose: false,
						shade: false,
					});
				} else {
					this.$sun.kf()
				}


			},
			// 拨打电话
			call() {
				this.$sun.phone(this.kfPhone);
			},
			// "客服联系" 取消按钮
			cancel() {
				this.$refs.pop.close();
			},
			issueInvoice(id) {

				this.$sun.navGo('/pages/confirmOrder/issueInvoice', {
					orderId: id,
					type: this.type
				});
			},
			goEvaluateList(goods_id) {
				console.log('111')
				this.$sun.navGo('/pages/detail/allEvaluateList', {
					goods_id: goods_id
				});

			},

			// 回到首页
			indexs() {
				uni.reLaunch({
					url: '/pages/index/index'
				});
			},
			// “使用优惠券”弹框
			couponClick() {
				this.$refs.popcoupon.show({
					anim: 'bottom',
					position: 'bottom',
					shadeClose: true, //false使用户不能点击其它关闭页面
					topclose: false
				});
			},
			//优惠卷单选框
			checkeBox(id, item) {
				this.list.filter(x => {
					if (id == x.id) {
						x.checkCoupon = x.checkCoupon == true ? false : true;
					} else {
						x.checkCoupon = false;
					}
				});
				//定义一个标识变量 没有选择的情况默认为0  有一个选中了的话count变成一个对象
				var count = 0;
				this.list.filter(x => {
					//循环查询是否有选中的
					if (x.checkCoupon == true) {
						//如果有进行把这个对象从这个数组获取到count变量存放
						count = x;
						//进行返回找到以后循环不需要再次执行
						return;
					}
				});
				//判断是否有选中的
				if (count == 0) {
					this.realSum = this.cc;
					this.couponHint = '未使用优惠券';
					this.couponMoney = 0;
					this.couponId = '';
					this.integralMoney = this.integralBack;
					if (this.integralChecked == true) {
						let money = Number(this.priceSum) - Number(this.integralMoney);
						this.realSum = money > 0 ? money : 0.01;
					} else {
						let money = Number(this.priceSum);
						this.realSum = money > 0 ? money : 0.01;
					}
				} else {
					this.receive(item);
				}
			},
			// 使用优惠券
			receive(item) {
				this.realSum = this.cc;
				this.couponId = item.id;
				this.couponMoney = item.less_money;
				let hint = item.coupon_type == 1 ? '满' + item.meet_money + '减' + item.less_money : '无门槛' + item.less_money;
				this.couponHint = hint;
				this.integralMoney = this.integralBack;
				if (this.integralChecked == true) {
					let money = Number(this.priceSum) - Number(this.couponMoney) - Number(this.integralMoney);
					this.realSum = money > 0 ? money : 0.01;
				} else {
					let money = Number(this.priceSum) - Number(this.couponMoney);
					this.realSum = money > 0 ? money : 0.01;
				}

				this.couponClose();
			},
			couponClose() {
				this.$refs.popcoupon.close();
			},
			// 我的优惠券
			async upCallback(scroll) {

			},

			// 复制订单号
			paste() {
				uni.setClipboardData({
					data: this.detailInfo.order_number
				});
			},
			// 订单详情
			async orderDetailFn() {
				console.log(this.type)
				// grouponOrderDetail
				let detailApi = this.type == 1 ? this.$api.orderDetail : this.type == 2 ? this.$api
					.grouponOrderDetail : this.type == 3 ? this.$api.seckillOrderDetail : this.type == 4 ? this.$api
					.bargainsOrderDetail : this.$api.presellOrderDetail
				const result = await this.$http.get({
					url: detailApi,
					data: {
						// 订单id
						order_id: this.order_id,
						uid: uni.getStorageSync('uid'),
					}
				});
				if (result.errno == 0) {
					this.detailInfo = result.data;

					this.orderList = [
						// status 1.待付款 2已付款 4.已完成
						{
							name: '订单号',
							content: this.detailInfo.log_no,
							type: 1
						},
						{
							name: '下单时间',
							content: this.detailInfo.create_time
						},
						{
							name: '支付方式',
							content: '微信支付'
						},
						// status == 0 ? '已取消' : status == 1 ? '待付款' : status == 2 ? '已完成' : status == 4 ? '已评价' :'申请开票';
						{
							name: '订单状态',
							content: this.orderStatusFn(this.detailInfo.is_status),
							isBlue: true
						},
						{
							name: '付款时间',
							content: this.detailInfo.pay_time,
							type: 2
						},
						{
							name: '备注信息',
							content: this.detailInfo.remark ? this.detailInfo.remark : '无',
							type: 2
						}
					];
				}
			},

			// 订单

			// 取消报名
			async cancelOrder(id) {
				uni.showModal({
					title: '提示',
					confirmColor: '#294d7d',
					content: '您确定取消报名吗?',
					success: async res => {
						if (res.confirm) {
							// 取消报名
							const orderInfo = await this.$http.get({
								url: this.$api.cancelApply,
								data: {
									//  订单id
									order_id: id
								}
							});
							if (orderInfo.code == 0) {
								this.$sun.toast(orderInfo.message);
								this.$sun.navBack();
							} else {
								this.$sun.toast(orderInfo.message);
							}
						}
					}
				});
			},
			// 查看发票
			look2222(fpUrl) {
				this.$sun.navGo('/pages/viewInvoice/viewInvoice', {
					fpUrl
				});
			},
			look(fpUrl) {
				// 现强制pdf文件
				uni.downloadFile({
					url: fpUrl, //文件地址
					success: function(res) {
						var filePath = res.tempFilePath;
						uni.openDocument({
							filePath: filePath,
							showMenu: true, //true:这个参数可设置你预览的文件能否被直接转发，此次是设置是否展示分享菜单
							success: function(res) {}

						});
					},
					fail: function(res) {
						// this.$sun.toast("查看失败")
					}
				});
			},
			// 立即评论
			comment(id) {
				console.log('立即评论')

				this.$sun.navGo('/pages/orderMessage/addSpeak/addSpeak', {

					type: this.type,
					orderId: id
				});
			},
			// 生成订单后——支付
			payTo(item) {
				antiThrottling.uniDoFunc({
					// 键名
					key: 'submit',
					success: async () => {
						//锁定
						antiThrottling.lockKey('submit');
						if (item.pay_type == 1) {
							this.pays(item);
						}
						// 余额支付下订单则支付，不需要再调用余额支付接口
					}
				});
			},
			// 支付
			async pays(item) {
				const result = await this.$http.get({
					url: this.$api.pay,
					data: {
						openid: wx.getStorageSync('openid'),
						// 支付金额
						price: Number(item.real_payment).toFixed(2),
						// 订单编号
						log_no: item.order_number
					}
				});
				if (result.code == 0) {
					this.$sun.title('支付');
					const pay = result.data;
					this.$sun.wePay(
						pay,
						async success => {
								this.$sun.navRe('/pages/orderMessage/groupOrder/groupOrder', {
									id: 1
								});
							},
							async cancel => {
								antiThrottling.releaseKey('submit');
								this.$sun.toast('取消了支付');
							}
					);
				} else {
					this.$sun.toast(result.message);
					antiThrottling.releaseKey('submit');
				}
			},
			// 余额支付
			async balancePays(item) {
				const result = await this.$http.post({
					url: this.$api.balancePay,
					data: {
						uid: uni.getStorageSync('uid'),
						// 订单id
						order_id: item.order_id
					}
				});
				if (result.code == 0) {
					this.$sun.navBack();
				} else {
					this.$sun.toast(result.message);
					antiThrottling.releaseKey('submit');
				}
			},
			// 支付弹框+优惠券和积分抵扣
			popPay(i) {
				// ==0 可以支付 否则不能支付
				// i.yk_status_c=1则可以支付 为空则不能支付
				if (i.yk_status_c) {
					this.itemAll = i;
					// 积分能抵扣的钱
					if (this.integral > this.ratio) {
						this.integralMoney = Number(this.integral / this.ratio).toFixed(2);
						this.integralBack = Number(this.integral / this.ratio).toFixed(2);
					}
					this.$refs.pop.show({
						anim: 'center',
						shadeClose: true, //false使用户不能点击其它关闭页面
						topclose: false
					});
				} else {
					this.$sun.toast('该订单暂不可支付');
					antiThrottling.releaseKey('submit');
				}
			},
			// 选择“支付方式”
			transformation(item) {
				if (item.id == 1) {
					this.zfList[1].checked = false;
					item.checked = !item.checked;
				}
				if (item.id == 2) {
					this.zfList[0].checked = false;
					item.checked = !item.checked;
				}
				this.applyId = item.id;
			},
			//"积分"单选 选择框
			integralClick() {
				this.integralChecked = this.integralChecked == true ? false : true;
				if (this.integralChecked == true) {
					this.price = Number(this.priceSum) - Number(this.couponMoney);
					if (this.couponId) {
						if (Number(this.integralMoney) > this.price) {
							this.integralMoney = this.price;
							this.money = Number(this.priceSum) - Number(this.couponMoney) - Number(this.integralMoney);
						} else {
							this.money = Number(this.priceSum) - Number(this.couponMoney) - Number(this.integralMoney);
						}
						this.realSum = this.money > 0 ? this.money : 0.01;
					} else {
						if (Number(this.integralMoney) > Number(this.priceSum)) {
							this.integralMoney = this.priceSum;
							this.money = Number(Number(this.priceSum) - Number(this.integralMoney)).toFixed(2);
						} else {
							this.money = Number(Number(this.priceSum) - Number(this.integralMoney)).toFixed(2);
						}
						this.realSum = this.money > 0 ? this.money : 0.01;
					}
				} else {
					if (this.couponId) {
						let money = Number(this.priceSum) - Number(this.couponMoney);
						this.realSum = money > 0 ? money : 0.01;
					} else {
						this.realSum = Number(this.priceSum).toFixed(2);
					}
				}
			},
			// 确定支付类型
			toCollection() {
				this.hintClick();
			},
			hintClick() {
				antiThrottling.uniDoFunc({
					// 键名
					key: 'submit',
					success: async () => {
						//锁定
						antiThrottling.lockKey('submit');
						if (this.applyId == 2 && Number(this.user.money) < Number(this.realSum)) {
							this.$sun.toast('余额不足');
							antiThrottling.releaseKey('submit');
						} else {
							this.groupPayOrder();

							this.$refs.pop.close();
							antiThrottling.releaseKey('submit');
						}
					}
				});
			},
			// 支付团购余款
			async groupPayOrder() {
				let integral = Number(this.integralMoney * this.ratio).toFixed(2);
				this.real = this.detailInfo.goods.discount - this.detailInfo.entry_price;
				const result = await this.$http.post({
					url: this.$api.groupPayTg,
					data: {
						// 报名id
						order_id: this.detailInfo.id,
						// 兑换所需积分
						integral: this.integralChecked == true ? integral : '',
						// 优惠券所优惠金额
						discount: this.couponMoney,
						// 优惠券id
						coupon_id: this.couponId,

						// 成团时人数
						// end_number: this.detailInfo.pe_count,
						end_number: this.detailInfo.end_number ? this.detailInfo.end_number : '',
						// 真实姓名
						realname: '',

						uid: uni.getStorageSync('uid'),
						// 原价
						price: this.detailInfo.goods.discount,
						// 实付价
						real_payment: this.realSum,
						// 支付类型	1.微信 2，余额
						pay_type: this.applyId,
						// 报名费
						entry_price: this.detailInfo.entry_price,
						// 电话
						mobile: this.mobile,

						// 是否需要开发票 1.不需要 2 需要
						need_fp: 1,
						// 发票对象
						fp_obj: {},
						// 备注
						remark: this.service,
						// 真实姓名
						realname: this.contacts
					}
				});
				if (result.code == 0) {
					this.itemAll = result.data;
					if (this.applyId == 1) {
						this.pays2(this.itemAll);
					} else {
						this.$sun.toast('余额支付成功');
						setTimeout(() => {
							this.$sun.navRe('/pages/orderMessage/groupOrder/groupOrder', {
								id: 2
							});
						}, 1000);
					}
				} else {
					this.$sun.toast(result.message);
				}
			},
			// 支付
			async pays2(item) {
				const result = await this.$http.get({
					url: this.$api.pay,
					data: {
						openid: wx.getStorageSync('openid'),
						// 支付金额
						price: this.realSum,
						// 订单编号
						// item.yk_order_number：余款的订单编号（暂不需使用）
						log_no: item.order_number
					}
				});
				if (result.code == 0) {
					this.$sun.title('支付');
					const pay = result.data;
					this.$sun.wePay(
						pay,
						async success => {
								this.$sun.toast(result.message);
								// this.$sun.navBack();
								this.$sun.navRe('/pages/orderMessage/groupOrder/groupOrder', {
									id: 2
								});
							},
							async cancel => {
								this.$sun.toast('取消了支付');
							}
					);
				} else {
					this.$sun.toast(result.message);
				}
			}
		}
	};
</script>

<style lang="less">
	/deep/ button::after {
		border: none;
		margin: 0rpx;
		padding: 0rpx;
	}

	// 购物车进入css
	.v-shop-cart {
		padding: 34rpx;
		border-bottom: 2rpx solid #f7f7f7;

		image {
			width: 140rpx;
			height: 140rpx;
			margin-right: 26rpx;
		}

		.v-content {
			.v-name {
				font-size: 32rpx;
				font-weight: bold;
			}

			text {
				color: #8f8f8f;
				// padding: 10rpx 0;
				padding: 10rpx 0 16rpx;
			}

			.v-price {
				color: #ff5f4e;
				font-size: 34rpx;
			}
		}
	}

	.v-order-detail {
		.orderStautsBg {
			position: relative;
			width: 750rpx;
			height: 286rpx;
			background: linear-gradient(180.00deg, rgb(0, 149, 255), rgb(0, 149, 255) 100%);

			.orderStauts {
				width: 100%;
				padding: 73rpx 50rpx 100rpx 40rpx;
				position: absolute;

				view {
					color: #fff;
				}

				text {
					color: #fff;
				}

				.v-icon {



					image {
						width: 33rpx;
						height: 33rpx;
					}
				}

				.kfImg {
					width: 24.46rpx;
					height: 24.46rpx;

				}

				.checkImg {
					width: 71.4rpx;
					height: 68.38rpx;
				}
			}


		}

		.border10 {
			width: 148rpx;
			height: 148rpx;
		}

		.v-padding {
			padding: 30rpx 34rpx;

			.v-color {
				color: #ff301d;
				padding: 54rpx 0;
			}

			.v-color-top {
				color: #ff301d;
				padding-top: 54rpx;
			}

			.v-p-top {
				margin-top: 34rpx;
				color: #294d7d;
			}
		}

		.v-title {
			font-size: 32rpx;
			font-weight: bold;
			padding: 34rpx 34rpx 20rpx;
		}

		.v-detailo-message {
			padding: 26rpx 34rpx;

			text {
				width: 200rpx;
				color: #8f8f8f;
			}

			.v-copy {
				width: 110rpx;
				height: 46rpx;
				font-size: 24rpx;
				border: 2rpx solid #8f8f8f;
				border-radius: 100rpx;
				margin: 0 34rpx;
			}
		}
	}

	.invoice {
		width: 176rpx;
		height: 76rpx;
		box-sizing: border-box;
		border: 2rpx solid rgb(232, 232, 232);
		border-radius: 194rpx;
		color: #999999;
		background: rgb(255, 255, 255);
	}

	.payCommite {
		width: 176rpx;
		height: 76rpx;
		border-radius: 194rpx;
		color: #fff;
		background: rgb(0, 149, 255);
	}

	// 客服联系
		.v-pop {
			width: 750rpx;
			background-color: #ffffff;
			border-radius: 20rpx 20rpx 0 0;
	
			.v-pop-phone {
				width: 100%;
				border-bottom: 2rpx solid #f7f7f7;
				color: #08ba06;
				font-size: 32rpx;
				padding: 36rpx 0 32rpx;
	
				image {
					width: 38rpx;
					height: 38rpx;
					margin-right: 12rpx;
				}
			}
	
			.v-cancel {
				width: 100%;
				padding: 36rpx 0;
				color: #8f8f8f;
				font-size: 32rpx;
			}
		}

	// 使用优惠券
	.v-pop-coupon {
		background: #ffffff;
		border-radius: 20rpx 20rpx 0 0;
		padding: 42rpx 0 0;
		// padding: 66rpx 0;

		.v-coupon-tilte {
			font-size: 32rpx;
			font-weight: bold;
			padding-bottom: 60rpx;
		}

		.v-discount {
			font-size: 32rpx;
			padding: 0 24rpx 30rpx;
		}

		.v-coupons {
			height: 160rpx;
			margin: 0 24rpx 20rpx;
			background-color: #f1f5ff;

			// background: #fcfdff;
			.v-left {
				.v-coupon-price {
					width: 140rpx;
					color: #294d7d;
					font-size: 36rpx;
					font-weight: bold;
					padding: 0 32rpx;
				}

				.v-identification {
					font-size: 24rpx;
					margin-top: 10rpx;
					color: #bdbbbb;
				}

				.v-conditions-met {
					border-left: 2rpx dashed #c9caca;
					padding: 0 34rpx;

					text {
						color: #a1a1a1;
						font-size: 24rpx;
						padding: 6rpx;
					}
				}
			}

			.v-coupon-btn {
				background: #294d7d;
				color: #ffffff;
				min-width: 150rpx;
				padding: 60rpx 0;
				font-size: 32rpx;
			}
		}

		.v-coupon-close {
			font-size: 32rpx;
			background: #294d7d;
			color: #ffffff;
			border-radius: 90rpx;
			// margin-top: 20rpx;
			width: 648rpx;
			height: 96rpx;
		}
	}
</style>